<template>
	<view class="home-ad">
		<swiper :autoplay="true" :interval="6000" :duration="1000" :circular="true">
			<block>
				<swiper-item v-for="(i, index) in imgs" :key="index" @click="next">
					<view class="swiper-item">
						<image :src="i" mode="" class="lun2"></image>
					</view>
				</swiper-item>
			</block>
		</swiper>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgs:['../../static/imgs/ad1.png','../../static/imgs/ad2.png']
			};
		},
		methods: {
			next() {
				if(this.$store.state.istoken) {
					uni.navigateTo({
						url: '/pages/inviteFd/inviteFd'
					})
				}
			}
		}
	}
</script>

<style>
	swiper{
		width: 90%;
		height: 230rpx;
		margin: auto;
	}
	.swiper-item>image {
		width: 670rpx;
		height: 210rpx;
	}
</style>
